<div nz-row [nzGutter]="24" >
    
    <div nz-col [nzSpan]="24" style="text-align: right; padding-right: 15px;">
        <nz-avatar nzIcon="user" style="margin-right: 6px;"></nz-avatar>
        @if (isLoggedIn) {
            <span nz-popover [nzPopoverContent]="loggedPopover" style="font-size: 1.0;">{{user?.username}}</span>
        } @else {
            <span style="font-size: 1.0;">请登录</span>
        }
    </div>
</div>

<ng-template #loggedPopover>
    <button nz-button class="action-button" (click)="onLogout($event)">退出登录</button>
</ng-template>